error:- mysql2 adapter: `gem install activerecord-mysql2-adapter`

The error while I got while working with rails version 3.0.7 is

Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (no such file to load — active_record/connection_adapters/mysql2_adapter)

Solution:-

In GemFile change

gem ‘mysql2’ to gem ‘mysql2’, ‘< 0.3’

and bundle it.

 

http://www.klairvoyant.in

Follow klairvoyantinfo on Twitter

klairvoyant Infosolutions on LinkedIn

for klairvoyant

About http://www.infosolutions.klairvoyant.com/

software development firm
This entry was posted in rails, ROR, ruby on rails and tagged , , , . Bookmark the permalink.

5 Responses to error:- mysql2 adapter: `gem install activerecord-mysql2-adapter`

  1. hyperrjas says:

    Where are GemFile?

    I only see Gemfile and Gemfile.lock

    Thank you

  2. rishta says:

    zOMG thanks, man

  3. Anand says:

    Hi ,

    I am a rooke in ROR… plz can you tell me is this the gem file found in the mysql2 gem folder??

    Content of gem file :
    source :rubygems

    gemspec

    i am not able to find gem ‘mysql2′ in this…

    Also plz can you tell me how to run bundle command.

    I am using Ubuntu 11.04 | rails 3.0.7

    • 1) here the Gemfile means file found in the top directory( which will created while creating rails application) . it’s a text file and you want to edit content of the file.

      2) In NetBeans IDE you will get the command in the right button click on project name

Leave a comment